package com.modbus.tool.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

/**
 * @Author: Leno
 * @Date: 2025-08-07
 * @Description:
 */
@Data
@TableName("collected_data")
@Schema(name = "CollectedData对象", description = "采集数据存储表")
public class CollectedData implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "数据记录ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "关联设备ID")
    private Integer deviceId;

    @Schema(description = "关联点位ID")
    private Integer pointId;

    @Schema(description = "解析后的数值")
    private Float value;

    @Schema(description = "原始字节数据(用于审计)")
    private byte[] rawData;

    @Schema(description = "采集时间戳")
    private LocalDateTime collectedAt;


}

